package com.example.getaudit.config.wx.cp;

import lombok.*;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author Binary Wang(https://github.com/binarywang)
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Component
@Primary
@ConfigurationProperties(prefix = "wechat.cp")
public class WxCpProperties {

    private List<AppConfig> appConfigs;

    @Getter
    @Setter
    public static class AppConfig {

        /**
         * 设置企业微信的corpId
         */
        private String corpId;

        /**
         * 设置企业微信应用的AgentId
         */
        private Integer agentId;

        /**
         * 设置企业微信应用的Secret
         */
        private String secret;

        /**
         * 设置企业微信应用的token
         */
        private String token;

        /**
         * 设置企业微信应用的EncodingAESKey
         */
        private String aesKey;

    }
}
